<!DOCTYPE html>
<html lang="en">

<head>
    <title>Document</title>
    <style>
        #app {
            border: 1px solid black;
            width: 1000px;
            white-space: normal;
            word-break: break-all;
            word-wrap: break-word;
        }
    </style>
</head>

<body>
    <input type="file" name="" id="file">
    <div id="app"></div>
    <script>
        document.getElementById('file').onchange = function() {
            var oFReader = new FileReader();
            oFReader.readAsDataURL(this.files[0])
            oFReader.onloadend = function() {
                // var imgList = document.getElementsByClassName('imgList')[0];
                // imgList.innerHTML = '<img src="' + this.result + '" alt=" ">';
                document.getElementById('app').innerText = this.result;
            };
        }
    </script>
</body>

</html>